package com.itheima.homework3;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class Demo3_Input {
    public static void main(String[] args) throws IOException {
        InputStreamReader isr =
                new InputStreamReader(
                        new FileInputStream("F:/字符流和字节流.txt"));
        StringBuilder s = new StringBuilder();
        char[] chars = new char[1024];
        int b ;
        while ((b=isr.read(chars))!=-1){
            s.append(chars,0,b);
        }
        String str = s.toString();
        System.out.println(str);


    }
}
